package com.xiaolai.iodemo.Validate.structure;

import com.xiaolai.iodemo.Validate.core.HandlerDefinition;

import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;

/**
 * obj 目标对象
 * target 属性和注解的映射
 * Created by Administrator on 2015/12/17.
 */
public class Target {
    Object obj;
    Map<Field, HandlerDefinition> target = new HashMap<Field, HandlerDefinition>();

    public Target(Field field, HandlerDefinition hd, Object object) {
        this.setTarget(object, field, hd);
    }

    public Target() {

    }

    public Map<Field, HandlerDefinition> getTarget() {
        return target;
    }

    public void setTarget(Object obj, Field field, HandlerDefinition hd) {
        target.put(field, hd);
        this.obj = obj;
    }
    public Object getObject() {
        return obj;
    }


}
